#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
char* Print_strncpy(char* dest, char* src, size_t num)
{
	char *ret = dest;
	while (num)
	{
		*dest++ = *src++;
		num--;
	}
	return ret;
}
char* Print_strncat(char* dest, const char* stc, size_t num)
{
	char* ret = dest;
	while (*dest)
	{
		dest++;
	}
	while (num)
	{
		*dest++ = *stc++;
		num--;
	}
	return ret;

}
char* Print_memcpy(char* dest, const char* src, int num)
{
	char* ret = dest;
	while (num)
	{
		*dest++ = *src++;
		num--;
	}
	return ret;
}

int main()
{
	char dest[20] = "abcdfdef";
	char src[] = "****";
	size_t num = 2;
	//scanf("%d", &num);
	//char a= Print_strncat(dest, src, num);
	printf("%s\n", Print_memcpy(dest, src, num));
	return 0;
}